import { requestCategoryList } from "@/api";
const state={
    categoryList:[]
};
const mutations={
    //把数据交给state中
    SET_CATEGORYLIST_STATE(state,value){
        state.categoryList=value
    }
};
const actions={
    async categoryListAction({commit}){
        const result=await requestCategoryList()
        commit('SET_CATEGORYLIST_STATE',result)
    }
};
const getters={};

export default{
    namespaced:true,
    state,
    mutations,
    actions,
    getters
}